home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / src / swtools / mipsABI / examples / sup / PORT / step06 / supcmeat.c.diff < prev    next >
Encoding:
Text File  |  1994-08-02  |  2.3 KB  |  97 lines

  1. *** ../step03/supcmeat.c    Thu Dec 16 13:59:00 1993
  2. --- supcmeat.c    Fri Dec 17 12:10:19 1993
  3. ***************
  4. *** 128,133 ****
  5. --- 128,136 ----
  6.   #else
  7.   #include <varargs.h>
  8.   #endif
  9. + #ifdef _ABI_SOURCE
  10. + #include <utime.h>
  11. + #endif
  12.   
  13.   #if __STDC__
  14.   void done (int, char *, ...);
  15. ***************
  16. *** 828,834 ****
  17. --- 831,841 ----
  18.   register int new;
  19.   register struct stat *statp;
  20.   {
  21. + #ifdef _ABI_SOURCE
  22. +     struct utimbuf tbuf;
  23. + #else
  24.       struct timeval tbuf[2];
  25. + #endif
  26.   
  27.       if (new) {
  28.           if (thisC->Cflags&CFLIST) {
  29. ***************
  30. *** 859,867 ****
  31. --- 866,880 ----
  32.           (void) chown (t->Tname,t->Tuid,t->Tgid);
  33.           (void) chmod (t->Tname,t->Tmode&S_IMODE);
  34.       }
  35. + #ifdef _ABI_SOURCE
  36. +     tbuf.actime = time((long *)NULL);
  37. +     tbuf.modtime = t->Tmtime;
  38. +     (void) utime (t->Tname,&tbuf);
  39. + #else
  40.       tbuf[0].tv_sec = time((long *)NULL);  tbuf[0].tv_usec = 0;
  41.       tbuf[1].tv_sec = t->Tmtime;  tbuf[1].tv_usec = 0;
  42.       (void) utimes (t->Tname,tbuf);
  43. + #endif
  44.       vnotify ("SUP %s directory %s\n",new?"Created":"Updated",t->Tname);
  45.       return (FALSE);
  46.   }
  47. ***************
  48. *** 908,914 ****
  49. --- 921,931 ----
  50.       register FILE *fin,*fout;
  51.       char dirpart[STRINGLENGTH],filepart[STRINGLENGTH];
  52.       char filename[STRINGLENGTH],buf[STRINGLENGTH];
  53. + #ifdef _ABI_SOURCE
  54. +     struct utimbuf tbuf;
  55. + #else
  56.       struct timeval tbuf[2];
  57. + #endif
  58.       register int x;
  59.       register char *p;
  60.   
  61. ***************
  62. *** 935,943 ****
  63. --- 952,966 ----
  64.               (void) chown (t->Tname,t->Tuid,t->Tgid);
  65.               (void) chmod (t->Tname,t->Tmode&S_IMODE);
  66.           }
  67. + #ifdef _ABI_SOURCE
  68. +         tbuf.actime = time((long *)NULL);
  69. +         tbuf.modtime = t->Tmtime;
  70. +         (void) utime (t->Tname,&tbuf);
  71. + #else
  72.           tbuf[0].tv_sec = time((long *)NULL);  tbuf[0].tv_usec = 0;
  73.           tbuf[1].tv_sec = t->Tmtime;  tbuf[1].tv_usec = 0;
  74.           (void) utimes (t->Tname,tbuf);
  75. + #endif
  76.           return (FALSE);
  77.       }
  78.       if (thisC->Cflags&CFLIST) {
  79. ***************
  80. *** 994,1002 ****
  81. --- 1017,1031 ----
  82.           (void) chown (t->Tname,t->Tuid,t->Tgid);
  83.           (void) chmod (t->Tname,t->Tmode&S_IMODE);
  84.       }
  85. + #ifdef _ABI_SOURCE
  86. +     tbuf.actime = time((long *)NULL);
  87. +     tbuf.modtime = t->Tmtime;
  88. +     (void) utime (t->Tname,&tbuf);
  89. + #else
  90.       tbuf[0].tv_sec = time((long *)NULL);  tbuf[0].tv_usec = 0;
  91.       tbuf[1].tv_sec = t->Tmtime;  tbuf[1].tv_usec = 0;
  92.       (void) utimes (t->Tname,tbuf);
  93. + #endif
  94.       return (FALSE);
  95.   }
  96.   
  97.